package com.twu.biblioteca;


public class Movie implements RentableObject {
    private String id;
    private String title;
    private String director;
    private int year,rating;
    private boolean checkedOut;

    Movie(String id, String title, String director, int year, int rating){
        this.id = id;
        this.title=title;
        this.director=director;
        this.year=year;
        this.rating=rating;
        this.checkedOut=false;
    }

    public String getTitle() {
        return this.title;
    }

    public String getId() {
        return this.id;
    }

    @Override
    public boolean getCheckedOut() {
        return this.checkedOut;
    }

    @Override
    public void markCheckedOut() {
        this.checkedOut = !checkedOut;
    }

    public String getDirector() {
        return this.director;
    }

    public int getYear() {
        return this.year;
    }

    public int getRating() {
        return this.rating;
    }

    @Override
    public String getDetails() {
        return String.format("%-20s%-50s%-50s%-20d%-20d",this.id,this.title,this.director,this.year,this.rating);
    }

}
